bcm2835-mmc: Prevent DMA race condition
authorPhil Elwell <phil@raspberrypi.org>
Tue, 18 Jul 2017 14:30:48 +0000 (15:30 +0100)
committerPhil Elwell <phil@raspberrypi.org>
Wed, 19 Jul 2017 13:56:56 +0000 (14:56 +0100)
commitfac9a6f7f867a8db8df8b82779831d6d436e9447
treee23d36d8eceb5bb329c7692e988483ef74e77c50
parent3d2fc07ef35db2a10cc259b263ae7250d00e487d
bcm2835-mmc: Prevent DMA race condition

The end of a read operation is triggered by the completion of the DMA
transfer, but writes are complete when the data IRQ is raised. The
bcm2835-mmc driver contains a race between the handling of the DMA
completion interrupt and the submission of the next request. Fix the
race by deferring the completion of the request until the DMA
transfer finishes.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
drivers/mmc/host/bcm2835-mmc.c